home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue61 / Clinic / NoNewEditWindowsU.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2000-06-29  |  831 b   |  44 lines

  1. unit NoNewEditWindowsU;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   AppEvnts, StdCtrls;
  8.  
  9. type
  10.   TNoNewEditWindowsForm = class(TForm)
  11.     ApplicationEvents: TApplicationEvents;
  12.     procedure ApplicationEventsMessage(var Msg: tagMSG;
  13.       var Handled: Boolean);
  14.   end;
  15.  
  16. procedure Register;
  17.  
  18. implementation
  19.  
  20. {$R *.DFM}
  21.  
  22. uses
  23.   Menus, StdActns;
  24.  
  25. var
  26.   NoNewEditWindowsForm: TNoNewEditWindowsForm;
  27.  
  28. procedure Register;
  29. begin
  30.   NoNewEditWindowsForm := TNoNewEditWindowsForm.Create(nil)
  31. end;
  32.  
  33. procedure TNoNewEditWindowsForm.ApplicationEventsMessage(var Msg: tagMSG;
  34.   var Handled: Boolean);
  35. begin
  36.   if (Msg.Message = wm_KeyDown) and (Msg.WParam = 0) then
  37.     Handled := True
  38. end;
  39.  
  40. initialization
  41. finalization
  42.   NoNewEditWindowsForm.Free
  43. end.
  44.